﻿@model PagedList.IPagedList<ITSTOREBLL.SanPham>

@{
    ViewBag.Title = "Tìm nâng cao";
}



<h2>Tìm kiếm nâng cao</h2>
<form>
<table style="width: 100%;" border = "0">
    <tr>
        <td>
            Giá tiền từ:
        </td>
        <td>
            @Html.TextBox("gianho") --> @Html.TextBox("gialon")<br/>
        </td>
    </tr>
    <tr>
        <td colspan = 2>
            @if (ViewData["lose"] != null)
                {
                <div id="successMessage">
                @ViewData["lose"]
                </div>
            }   
        </td>
    </tr>
    <tr>
        <td>
            Số lượng từ:
        </td>
        <td>
            @Html.TextBox("slnho") --> @Html.TextBox("sllon")
        </td>
    </tr>
    <tr>
        <td colspan = 2>
            @if (ViewData["error"] != null)
            {
                <div id="successMessage">
                @ViewData["error"]
                </div>
            }
        </td>
    </tr>
    <tr>
        <td>Loại sản phẩm:</td>
        <td>@Html.Action("DropMenu","Menu")</td>
    </tr>
    <tr>
        <td>Nhà sản xuất:</td>
        <td>@Html.Action("NhaSanXuat","Menu")</td>
    </tr>
    <tr>
        <td colspan = 2><input type=submit id="timkiem" value="Tìm kiếm" /></td>
    </tr>
</table>
</form>
    
@foreach (var item in Model)
{
    <div class="col col_14 product_gallery no_margin_right">
    <a href="Details/@Html.DisplayFor(modelItem => item.sp_ID)" ><img src="../@Html.DisplayFor(modelItem => item.sp_Hinh)" alt="Product 09" width="200" height="200"/></a>
    <h3>@Html.DisplayFor(modelItem => item.sp_Ten)</h3>
    <p class="product_price">
        <span id="price_update_4"><span id="line_discounted_price_4">@Html.DisplayFor(modelItem => item.sp_Gia) USD</span></span></p>
    <a href="shoppingcart.html" class="add_to_cart">Thêm vào giỏ hàng</a>
    </div>
}

<div class="cleaner"></div>
<p align=center>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<", "Index", new { page = 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
        @Html.Raw(" ");
        @Html.ActionLink("< Prev", "Index", new { page = Model.PageNumber - 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
    }
    else
    {
        @:<<
        @Html.Raw(" ");
        @:< Prev
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("Next >", "Index", new { page = Model.PageNumber + 1, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
        @Html.Raw(" ");
        @Html.ActionLink(">>", "Index", new { page = Model.PageCount, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.currentFilter })
    }
    else
    {
        @:Next >
        @Html.Raw(" ")
        @:>>
    }
<p>